package org.grow.erp.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.ToString;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.StringJoiner;

/**
 * @Author: xwg
 * @CreateDate: 2022/4/28
 */

@Entity
@Data
@ToString(exclude = {"foodBill"})
@IdClass(FoolBillItemCID.class)
public class FoodBillItem {
    @Id
    private String itemId;
    @Id
    private String foodBillFk;
    private String itemName;
    private BigDecimal itemPrice;
    private BigDecimal quantity;
    @ManyToOne()
    @JoinColumn(name = "foodBillFk")
    @MapsId("foodBillFk")
    @JsonIgnore
    private FoodBill foodBill;

}
